/**
 * AdbWrapper.java
 *
 * Copyright (C) 2013 Timo Tegtmeier.
 * All rights reserved.
 */

public class AdbWrapper {

    public static boolean forwardPort(int port) {
        return CmdExecuter.executeCmd(String.format("adb forward tcp:%d tcp:%d", port, port)) == 0;
    }

    public static boolean pushFile(String localPath, String devicePath) {
        if(localPath.contains(" ")) {
            System.out.println("App package path may not contain spaces!");
            return false;
        }
        return CmdExecuter.executeCmd(String.format("adb push %s %s", localPath, devicePath)) == 0;
    }
}
